-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: space pkm response to max once per minute #2422
Conversation
flow/connectors/postgres/cdc.go
Outdated
@@ -386,7 +386,8 @@ func PullCdcRecords[Items model.Items]( | |||
|
|||
for { | |||
if pkmRequiresResponse { | |||
if cdcRecordsStorage.IsEmpty() && int64(clientXLogPos) > req.ConsumedOffset.Load() { | |||
if cdcRecordsStorage.IsEmpty() && int64(clientXLogPos) > req.ConsumedOffset.Load() && | |||
time.Since(standByLastLogged) >= 1*time.Minute { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally we'd throttle this based on this update, not alongside existing logging code. Or move logging code in here & only log once a minute
As is we may be logging every 10s & never update offset
6415919
to
7755201
Compare
flow/connectors/postgres/cdc.go
Outdated
@@ -383,7 +384,12 @@ func PullCdcRecords[Items model.Items]( | |||
|
|||
pkmRequiresResponse := false | |||
waitingForCommit := false | |||
|
|||
pkmEmptyBatchThrottleEnabled, err := peerdbenv.PeerDBPKMEmptyBatchThrottleEnabled(ctx, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pkmEmptyBatchThrottleEnabled, err := peerdbenv.PeerDBPKMEmptyBatchThrottleEnabled(ctx, nil) | |
pkmEmptyBatchThrottleEnabled, err := peerdbenv.PeerDBPKMEmptyBatchThrottleEnabled(ctx, req.Env) |
No description provided.